<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/token.jsp"%>
<%
	Integer id = input.getInt("id", -1);
	String type =  input.getDesc("type", "");
	String treatProgress =  input.getDesc("treat_progress", "");
	String imgs =  input.getDesc("imgs", "");
	List<String> imgsList = stringToList(imgs);
	String voices =  input.getDesc("voices", "");
	List<String> voicesList = stringToList(voices);
	String date =  input.getDesc("date", "");
	String diagnose =  input.getDesc("diagnose", "");
	String visitHospitalName =  input.getDesc("visit_hospital_name", "");
	String visitDeptName =  input.getDesc("visit_dept_name", "");
	String visitDoctorName =  input.getDesc("visit_doctor_name", "");
	List<Map> timeLines = QBuilder.db("basedb").select().from("time_line").where(new Where("hospital=", hospital).and("status=", STATUS_ENABLE).and("id=", id)).query().getResultObj();
	if (isEmpty(timeLines)) {
		Tools.encryptPrint(out, new Message(30041, "没有找到这条记录"));
		return;
	}
	Map timeLine = timeLines.get(0);
	timeLine.put("date", date);
	timeLine.put("treat_progress", treatProgress);
	timeLine.put("imgs", JSONUtil.toJson(imgsList));
	timeLine.put("voices", JSONUtil.toJson(voicesList));
	timeLine.put("type", type);
	timeLine.put("diagnose", diagnose);
	timeLine.put("visit_hospital_name", visitHospitalName);
	timeLine.put("visit_dept_name", visitDeptName);
	timeLine.put("visit_doctor_name", visitDoctorName);
	DBTools.db("basedb").modItem("time_line", timeLine);
	Tools.encryptPrint(out, msg);
%>
